﻿/// <summary>
/// 邮箱地址信息
/// </summary>
public class MailAddress
{
    public string Name { get; set; } = string.Empty;
    public string Address { get; set; } = string.Empty;

    public MailAddress() { }

    public MailAddress(string name, string address)
    {
        Name = name;
        Address = address;
    }

    public override string ToString()
    {
        return string.IsNullOrEmpty(Name) ? Address : $"{Name} <{Address}>";
    }
}